package com.wushijia.model;

import lombok.Getter;
import lombok.Setter;

/**
 * description:交易
 *
 * @author yang
 * @date 2018/5/1 7:15
 */
@Setter
@Getter
public class Transaction {

  private final Trader trader;
  private final int year;
  private final int value;

  public Transaction(Trader trader, int year, int value) {
    this.trader = trader;
    this.year = year;
    this.value = value;
  }

  @Override
  public String toString() {
    return this.trader.getName() + " in " + this.year + " trade " + this.value;
  }
}
